|
|
|
|
|
|
|
nTemp = InStr(sInput, "DATE =")
If nTemp <> 0 Then sDate = Mid(sInput, nTemp + 7, 4)
nTemp = InStr(sInput, "TIME =")
If nTemp <> 0 Then sTime = Mid(sInput, nTemp + 7, 4)
sTemp = Left$(sNumber, 3) & "-" & Mid$(sNumber, 4, 3) _
& "-" & Right$(sNumber, 4)
sNumber = sTemp
End If
If sNumber = "?" Then Exit Sub
'WRITE INFORMATION TO THE INI FILE
nCount = nCount + 1
writeINIString sINIfile, "General", "CallCount", CStr(nCount)
sSection = "Call" & nCount
writeINIString sINIfile, sSection, "Time", Format$(Now, "mm/dd hh:mm a/p")
writeINIString sINIfile, sSection, "Number", sNumber
writeINIString sINIfile, sSection, "Name", sName
End Sub |
|
|
|
|
|
|
|
|
The reason you need so many Instr calls is that when you receive information using the MS Comm Control, it comes across as one long string, with embedded carriage returns and line feeds. Notice that WriteCIDData sends the information to the INI file, and then it is read back as separate fields by the CheckForCall function. |
|
|
|
|
| |
|
|
|
|
This project is available at the Web site www.mcp.com/info. The project files are contained in the file CALLID.ZIP. |
|
|
|
|
|
|
|
|
|
|
Building a Screen Saver in Visual Basic |
|
|
|
|
|
|
|
|
Windows comes with programs known as screen savers, which are executed automatically after a period of inactivity. The theory behind a screen saver is that it will ''save" your monitor from having information permanently burned on the picture tube. This burning was particularly a problem with older text-only terminals, which could have the same menu sitting on them for hours at a time. (It is also the reason that owners' manuals for televisions warn against using video games.) You can set the screen saver in the Screen Saver tab of the Display Properties dialog box, as shown in Figure 23.2. |
|
|
|
|
|